<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Breaking changes in 7.6 | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'breaking-changes-7.6.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/breaking-changes-7.6.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/breaking-changes-7.6.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/breaking-changes-7.6.html" rel="nofollow" target="_blank">../en/breaking-changes-7.6.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="breaking-changes.html">Breaking changes</a></span>
»
<span class="breadcrumb-node">Breaking changes in 7.6</span>
</div>
<div class="navheader">
<span class="prev">
<a href="breaking-changes-7.7.html">« Breaking changes in 7.7</a>
</span>
<span class="next">
<a href="breaking-changes-7.5.html">Breaking changes in 7.5 »</a>
</span>
</div>
<div class="chapter">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="breaking-changes-7.6"></a>Breaking changes in 7.6<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_6.asciidoc">edit</a>
</h2>
</div></div></div>

<p>This section discusses the changes that you need to be aware of when migrating
your application to Elasticsearch 7.6.</p>
<p>See also <a class="xref" href="release-highlights.html" title="7.7版本的新特性"><em>7.7版本的新特性</em></a> and <a class="xref" href="es-release-notes.html" title="Release notes">Release notes</a>.</p>
<h3>
<a id="breaking_76_security_changes"></a>Security changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_6.asciidoc">edit</a>
</h3>
<h4>
<a id="_elasticsearch_api_key_privileges"></a>Elasticsearch API key privileges<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_6.asciidoc">edit</a>
</h4>
<p>If you use an API key to create another API key (sometimes called a
<em>derived key</em>), its behavior is impacted by the fix for
<a href="https://www.elastic.co/community/security" class="ulink" target="_top">CVE-2020-7009</a>.</p>
<p>When you make a request to create API keys, you can specify an expiration and
privileges for the API key. Previously, when you created a derived key, it had
no privileges. This behavior disregarded any privileges that you specified in
the <a href="security-api-create-api-key.html" class="ulink" target="_top">create API key API</a>.</p>
<p>As of 7.6.2, this behavior changes. To create a derived key, you must explicitly
specify a role descriptor with no privileges:</p>
<div class="pre_wrapper lang-js">
<pre class="programlisting prettyprint lang-js">...
"role_descriptors": {
    "no-privilege": {
    }
}
...</pre>
</div>
<h3>
<a id="breaking_76_search_changes"></a>Search changes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_6.asciidoc">edit</a>
</h3>
<h4>
<a id="_aggregating_and_sorting_on_id_is_deprecated"></a>Aggregating and sorting on <code class="literal">_id</code> is deprecated<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_6.asciidoc">edit</a>
</h4>
<p>It’s possible to aggregate and sort on the built-in <code class="literal">_id</code> field by loading an
expensive data structure called fielddata. This was deprecated in 7.6 and will
be disallowed by default in 8.0. As an alternative, the <code class="literal">_id</code> field’s contents
can be duplicated into another field with docvalues enabled (note that this
does not apply to auto-generated IDs).</p>
<h4>
<a id="_deprecation_of_sparse_vector_fields"></a>Deprecation of sparse vector fields<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_6.asciidoc">edit</a>
</h4>
<p>The <code class="literal">sparse_vector</code> field type has been deprecated and will be removed in 8.0.
We have not seen much interest in this experimental field type, and don’t see
a clear use case as it’s currently designed. If you have feedback or
suggestions around sparse vector functionality, please let us know through
GitHub or the <em>discuss</em> forums.</p>
<h4>
<a id="_update_to_vector_function_signatures"></a>Update to vector function signatures<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_6.asciidoc">edit</a>
</h4>
<p>The vector functions of the form <code class="literal">function(query, doc['field'])</code> are
deprecated, and the form <code class="literal">function(query, 'field')</code> should be used instead.
For example, <code class="literal">cosineSimilarity(query, doc['field'])</code> is replaced by
<code class="literal">cosineSimilarity(query, 'field')</code>.</p>
<h4>
<a id="_disallow_use_of_the_ngram_and_edgengram_tokenizer_names"></a>Disallow use of the <code class="literal">nGram</code> and <code class="literal">edgeNGram</code> tokenizer names<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/migration/migrate_7_6.asciidoc">edit</a>
</h4>
<p>The <code class="literal">nGram</code> and <code class="literal">edgeNGram</code> tokenizer names haven been deprecated with 7.6.
Mappings for indices created after 7.6 will continue to work but emit a
deprecation warning. The tokenizer name should be changed to the fully
equivalent <code class="literal">ngram</code> or <code class="literal">edge_ngram</code> names for new indices and in index
templates.</p>
</div>
<div class="navfooter">
<span class="prev">
<a href="breaking-changes-7.7.html">« Breaking changes in 7.7</a>
</span>
<span class="next">
<a href="breaking-changes-7.5.html">Breaking changes in 7.5 »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>